package top.vains.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author vains
 * @since 2020-02-17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("资源实体，包括导航栏与按钮，控制全局资源")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "navId", type = IdType.AUTO)
    @ApiModelProperty(value = "自增ID", dataType = "Integer", example = "0")
    private Integer navId;

    /**
     * 节点名称
     */
    @ApiModelProperty(value = "节点名称", dataType = "String", example = "测试节点")
    private String name;

    /**
     * 页面路径
     */
    @TableField("pageUrl")
    @ApiModelProperty(value = "页面路径", dataType = "String", example = "/test/test")
    private String pageUrl;

    /**
     * 父节点
     */
    @TableField("parentId")
    @ApiModelProperty(value = "父节点", dataType = "Integer", example = "1")
    private Integer parentId;

    /**
     * 0-导航栏  1-按钮  2-其他
     */
    @ApiModelProperty(value = "0-导航栏  1-按钮  2-其他", dataType = "Integer", example = "0")
    private Integer type;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除", dataType = "Boolean", example = "false")
    private Boolean deleted;

    /**
     * 是否需要权限
     */
    @ApiModelProperty(value = "是否需要权限，需要权限时为所需的具体权限", dataType = "String", example = "anon")
    private String authorization;


}
